home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#30 (Mar 88)
/
chroma source.mpw
/
Chroma.r
< prev
Wrap
Text File
|
1988-02-09
|
14KB
|
341 lines
/*
* File Chroma.r
*
* Copyright The MacHax™ Group, 1988
* All rights reserved.
*
*/
#include "Types.r" /* To get system types */
#include "MPWTypes.r" /* To get 'DRVW' type */
type 'DRVR' as 'DRVW'; /* Map 'DRVW' => 'DRVR' */
/*
* This will produce a DRVR resource from the special
* DRVW type.
*
* Note that the ID 12 is irrelevant, since the
* Font/DA Mover will renumber it (and its owned resources)
* to something else when installing it anyway.
*
* The leading NUL in the resource name is required to
* conform to the desk accessory naming convention.
*
* The resource is declared purgeable. If the code were
* to do funky things like SetTrapAddress calls
* (requiring the code to be around at all times), we
* would have to set it nonpurgeable.
*/
#define DriverID 12
resource 'DRVR' (DriverID, "\0x00Chroma", purgeable) {
/*
* DRVR flags
*/
dontNeedLock, /* OK to float around */
needTime, /* Give us per. Control calls */
dontNeedGoodbye, /* No special requirements */
noStatusEnable,
ctlEnable, /* Enable Control calls */
noWriteEnable,
noReadEnable,
6, /* drvrDelay - Every 1/10 second */
updateMask + mDownMask, /* drvrEMask - Events we want */
0, /* drvrMenu - No menu */
"Chroma", /* drvrName - Just for grins */
/*
* This directive inserts the contents of the
* DRVW resource produced by linking DRVRRuntime.o
* with our DA code
*/
$$resource("Chroma.DRVW", 'DRVW', 0)
};
#define infoStrings 0
resource 'STR#' ( ( 0xC000 | ( DriverID << 5 ) ) +
infoStrings ) {
{
"Slot";
"gdRefNum";
"gdFlags";
"gdMode"
};
};
#define bwChromaPicture 0
#define colorChromaPicture 1
#define sorryPicture 2
resource 'PICT' ( ( 0xC000 | ( DriverID << 5 ) ) +
colorChromaPicture ) {
2504,
{13, 137, 96, 265},
$"0011 02FF 0C00 FFFF FFFF 0089 0000 000D"
$"0000 0109 0000 0060 0000 0000 0000 001E"
$"0001 000A 0000 0000 015E 01B8 0098 8040"
$"000D 0089 0060 0109 0000 0000 0000 0000"
$"0048 0000 0048 0000 0000 0004 0001 0004"
$"0000 0000 0000 1F10 0000 0000 0000 0004"
$"8000 000F 0000 FFFF FFFF FFFF 0000 FC00"
$"F37D 052F 0000 FFFF 648A 028C 0000 DD6B"
$"08C2 06A2 0000 F2D7 0856 84EC 0000 46E3"
$"0000 A53E 0000 0000 0000 D400 0000 0241"
$"AB54 EAFF 0000 1F21 B793 1431 0000 0000"
$"64AF 11B0 0000 5600 2C9D 0524 0000 90D7"
$"7160 3A34 0000 C000 C000 C000 0000 8000"
$"8000 8000 0000 4000 4000 4000 0000 0000"
$"0000 0000 000D 0089 0060 0109 000D 0089"
$"0060 0109 0000 02C1 0002 C100 02C1 0008"
$"F000 0201 1110 D500 0EF7 0000 03FE 33FE"
$"0002 1111 10D5 000F F800 0003 FD33 0530"
$"0000 1111 10D5 000B F800 FB33 0300 0111"
$"11D4 0010 F900 0003 FE33 0603 3333 0001"
$"1111 D400 21F9 00FE 3307 0000 3333 0001"
$"1110 FC00 0188 88FA 0003 0777 7770 F100"
$"FE44 0040 FA00 26F9 0008 3333 3000 0333"
$"3300 01FD 1102 1000 00FC 8803 8000 0007"
$"FD77 0100 00FC 66F9 00FB 44FB 0029 FA00"
$"0803 3333 0000 0333 3300 FB11 0100 00FB"
$"8801 0000 FC77 0170 00FC 6600 60FE 66FE"
$"0000 04FB 44FB 002B FA00 0803 3333 0000"
$"0333 3000 FB11 0210 0008 FC88 0100 07FC"
$"7701 7000 F866 0260 0000 FE44 0340 0444"
$"44FB 002E FA00 0203 3330 FB00 FB11 0810"
$"0008 8888 8088 8800 FE77 0400 0777 7000"
$"FE66 0006 FB66 0800 0444 4440 0004 4444"
$"FB00 30FA 0002 0333 30FB 00FE 1107 1001"
$"1110 0008 8888 FD00 0B77 7770 0007 7770"
$"0066 6660 00FB 6608 0004 4444 0000 0444"
$"40FB 0034 FA00 0203 3330 FB00 FE11 0710"
$"0111 1000 8888 80FE 000C 0777 7700 0007"
$"7770 0066 6660 00FE 660B 0066 6600 4444"
$"4000 0044 4440 FB00 34FA 0002 0333 30FB"
$"00FE 1107 0001 1110 0088 8880 FE00 1B07"
$"7777 0000 0777 7006 6666 0000 6666 6000"
$"6666 0044 4440 0000 4444 40FB 0032 FA00"
$"0203 3330 FB00 FE11 0600 0111 1000 8888"
$"FD00 1A07 7770 0000 0777 7006 6666 0006"
$"6666 0000 6666 0044 4400 0004 4444 FA00"
$"32FA 0002 0333 30FB 00FE 1106 0011 1110"
$"0088 88FD 001A 0777 7000 0077 7770 0666"
$"6000 0666 6600 0066 6600 4444 0000 0444"
$"44FA 0032 FA00 0203 3333 FB00 0911 1110"
$"0011 1110 0888 88FD 0017 0777 7000 0077"
$"7770 0666 6000 0666 6000 0066 6600 4444"
$"0000 FE44 FA00 35FA 0012 0333 3300 0003"
$"3330 0011 1110 0011 1100 0888 88FD 0017"
$"0777 7000 0777 7770 6666 6000 0666 6000"
$"0666 6600 4444 4004 FE44 FA00 2FF9 00FE"
$"330E 0033 3330 0011 1110 0111 1100 0888"
$"80FD 0003 0777 7707 FE77 0C00 6666 6000"
$"6666 6000 0666 6600 FA44 FA00 2CF9 00FB"
$"330B 3000 1111 0001 1111 0008 8880 FD00"
$"0007 FC77 0D70 0066 6600 0066 6660 0006"
$"6660 00FA 4400 40FB 002D F900 0003 FC33"
$"0B00 0011 1100 0111 1000 0888 80FC 00FC"
$"770E 0000 6666 0000 6666 0000 0666 6000"
$"04FB 4400 40FB 0033 F800 0003 FE33 0C30"
$"0000 1111 0001 1110 0008 8880 FC00 0007"
$"FE77 FE00 0C66 6600 0066 6600 0006 6660"
$"0000 FE44 0300 0444 40FB 0002 C100 02C1"
$"0002 C100 02C1 0002 C100 0BFE 0001 0FF0"
$"E400 00FF E400 20FE 0001 0FF0 F700 010F"
$"FFF1 0004 0FFF 000F F0F4 0000 FFFC 0004"
$"0FF0 0000 FFFF 001B FE00 00FF F700 010F"
$"FFF0 0004 0FFF 00FF F0EE 0004 0FF0 0000"
$"FFFF 003F FE00 07FF FFF0 00FF 000F F0FE"
$"0000 FFFE 000A 0FFF FFF0 0FFF F000 00FF"
$"F0FD 0009 FFFF 0FFF F000 0FFF FF00 FEFF"
$"090F FFFF F00F F000 0FFF 00FE FF04 0FFF"
$"FFF0 003E FE00 0BFF F0FF 00FF 000F F000"
$"000F F0FE 000A 0FFF 0000 FF00 FF00 0FF0"
$"FFFD 00FE FF19 0FF0 00FF 00FF 00FF F000"
$"0FFF 0000 0FF0 00FF 0FF0 00FF 0000 0FF0"
$"FF00 40FE 0006 FF00 0FF0 FF00 FFFE 000F"
$"0FF0 0FFF 000F F000 0FF0 00FF 00FF 00FF"
$"FE00 1D0F F0FF FF0F F00F F000 FF00 FF00"
$"000F F000 000F F00F F00F F000 FF00 000F"
$"F0FF 0040 FE00 06FF 000F F00F FFF0 FE00"
$"0F0F F0FF 0FF0 0FF0 000F FFFF F000 FF00"
$"FFFE 001D 0FF0 FFF0 FF00 FF00 0FF0 00FF"
$"0000 0FF0 0000 0FF0 FF00 0FF0 00FF 0000"
$"0FF0 FF00 4009 0000 0FF0 000F F00F FFF0"
$"FE00 0F0F F000 0FF0 FF00 000F F000 000F"
$"F00F FFFE 000E 0FF0 FF00 FF00 FF00 0FF0"
$"0FF0 0000 FFFE 000A FF00 FF00 0FF0 0FF0"
$"0000 FFFE 003E 0800 000F F000 FF00 00FF"
$"FC00 0EFF 00FF 00FF 0000 0FF0 0FF0 0FF0"
$"FFFF FE00 0EFF 0000 0FF0 00FF 00FF F00F"
$"F000 00FF FE00 0AFF 00FF 00FF 000F F000"
$"00FF FE00 3E08 0000 0FFF FFF0 0000 FFFC"
$"0004 0FFF F000 FFFE 0006 FFFF 0000 FFFF"
$"F0FE 000E FF00 000F F000 0FFF FFF0 0FF0"
$"0000 FFFE 000A FF00 0FFF F000 0FF0 0000"
$"FFFE 000C FA00 010F F0EF 0001 0FF0 DE00"
$"0DFA 0001 0FF0 F100 020F F0FF DD00 0BFA"
$"0000 FFEF 0001 FFF0 DD00 02C1 0002 C100"
$"02C1 0002 C100 02C1 0002 C100 02C1 0002"
$"C100 02C1 0002 C100 02C1 0002 C100 02C1"
$"0002 C100 0703 000F FFF0 C500 3215 00F0"
$"000F 0000 F000 0FFF 000F FF00 0FFF 0000"
$"0FFF FF0F FB00 03F0 0000 F0FC 0002 F000"
$"F0FC 0008 0FFF F000 F000 00FF F0F7 0031"
$"150F 00FF 00F0 0FF0 00F0 00F0 F000 F0F0"
$"00F0 0000 0F00 0FFB 0003 FF00 0FF0 FC00"
$"02F0 00F0 FB00 07F0 FF0F F000 0F00 0FF7"
$"003F 1B0F 0F00 00F0 00F0 00F0 00F0 F000"
$"F0F0 00F0 0000 0F00 0FFF 000F F000 00FD"
$"F00D 0FF0 00FF 00F0 00F0 0FF0 0F00 0F00"
$"FDF0 0D00 0F00 000F 0FF0 0FF0 0F00 F0FF"
$"F041 0F0F 0F00 00F0 00F0 000F FFF0 0FFF"
$"000F FFFE 002C 0F00 0F00 F0F0 0F00 00F0"
$"0F00 F000 0F0F 00F0 FFFF F000 0F00 F0F0"
$"00F0 F000 F000 0F00 FF0F F000 F00F 0F00"
$"F0F0 0F3D 060F 00FF 00F0 00F0 FE00 21F0"
$"F000 F0F0 00F0 0000 0F00 0F00 F0FF FF00"
$"00F0 0000 F00F FF0F 0000 F000 F00F FF00"
$"0FFA 000C 0F00 0F0F 0000 F00F 0F00 F0F0"
$"0F3E 1800 F000 0F00 00F0 0000 0F00 F000"
$"F0F0 00F0 0000 0F00 0F00 F0F0 FE00 10F0"
$"0000 F0F0 0F0F 00F0 F000 F0F0 0F00 F0F0"
$"FB00 0C0F 000F 0F00 00F0 0F0F 00F0 F00F"
$"3D0F 000F FFF0 0000 F000 0FF0 000F FF00"
$"0FFF FE00 190F 000F 00F0 0FF0 0000 F000"
$"00F0 0FFF 00FF 00F0 00F0 0FFF 0F00 0FFA"
$"000B FFF0 0F00 000F F000 FFF0 FFF0 05C3"
$"0001 F000 05C3 0001 F000 02C1 0002 C100"
$"02C1 001F F600 10F0 00FF 0FF0 000F FFF0"
$"00F0 0000 0F00 000F FC00 01FF FFEF 0000"
$"F0F7 001F F600 08F0 000F 00F0 000F 000F"
$"FD00 030F 0000 0FFC 0002 F000 F0F0 0000"
$"F0F7 0031 F700 2B0F 0F00 0F00 F000 0F00"
$"0F0F F00F FF0F FF00 FFF0 0FFF 0000 F000"
$"F00F F000 FFF0 0FF0 0F0F F0F0 00F0 0FF0"
$"00FF F0F7 0031 F700 130F 0F00 0F00 F000"
$"0FFF F000 F0F0 0F0F 00F0 0F00 F0FE 0014"
$"FFFF 00F0 0F0F 0000 F00F 0FF0 000F 0F00"
$"F00F 0F00 F0F7 0031 F700 2BFF FFF0 0F00"
$"F000 0F0F 0000 F0F0 0F0F 00F0 0F00 0FF0"
$"0000 F0F0 00FF FF00 FF00 FFFF 0F00 000F"
$"0F00 FFFF 0F00 F0F7 0031 F700 1AF0 00F0"
$"0F00 F000 0F00 F000 F0F0 0F0F 00F0 0F00"
$"000F 0000 F00F 00F0 FE00 03F0 F000 0FFE"
$"0006 F000 F000 0F00 F0F7 0032 F700 21F0"
$"00F0 0F00 F000 0F00 0F00 F00F FF0F 00F0"
$"00F0 FFF0 0000 F000 F00F F00F FF00 0FF0"
$"0FFE 0007 F000 0FF0 00FF F00F F800 06EA"
$"0000 0FD9 0007 EB00 010F F0D9 0002 C100"
$"02C1 0002 C100 02C1 0002 C100 00FF"
};
resource 'PICT' ( ( 0xC000 | ( DriverID << 5 ) ) +
bwChromaPicture ) {
1023,
{83, 167, 166, 295},
$"1101 A000 8201 000A 0000 0000 02D0 0240"
$"9800 1200 5300 A000 A601 2800 5300 A700"
$"A601 2700 5300 A700 A601 2700 0002 EF00"
$"02EF 0002 EF00 06FC 0000 3CF5 0008 FE00"
$"020F E07C F500 08FE 0002 3FF0 7CF5 0008"
$"FE00 027F F8F8 F500 08FE 0002 FEF8 F8F5"
$"0011 0900 0001 F878 F001 E000 3FFD 0000"
$"7FFE 0013 0F00 0001 F0F8 FFC1 FFC0 FF87"
$"FE00 01FF E0FF 0013 0F00 0003 E0F9 FFE1"
$"FFE1 FFC7 FF7E 03FF E0FF 0013 0F00 0003"
$"E0F1 FFF0 FFE3 FFC7 FFFF 07F3 E0FF 0013"
$"0F00 0003 C001 FFF0 FDE7 E3C7 EFFF 8FC3"
$"E0FF 0013 0F00 0003 C001 FCF0 F807 C3C7"
$"C7FF 8F83 C0FF 0013 0F00 0003 C001 FCF1"
$"F00F 83C7 C7E7 9F07 C0FF 0013 0F00 0003"
$"C001 F8F1 F00F 83CF 87C7 9F07 C0FF 0013"
$"0F00 0003 C001 F8F1 E00F 03CF 8F87 9E0F"
$"80FF 0013 0F00 0003 C001 F9F1 E00F 07CF"
$"0F87 9E0F 80FF 0013 0F00 0003 E001 F1F3"
$"E00F 07CF 0F07 9E1F 80FF 0013 0F00 0003"
$"E0F1 F1E3 E00F 0F9F 0F0F 9F3F 80FF 0013"
$"0F00 0001 F9F1 F3E3 C00F BF9F 1F0F 9FFF"
$"80FF 0013 0F00 0001 FFF1 E3E3 C00F FF1E"
$"1F0F 0FFF C0FF 0012 FE00 0CFF E1E3 C3C0"
$"07FE 1E1E 0F0F FFC0 FF00 12FE 000C 3FC1"
$"E3C3 C003 F81E 1E0F 07E3 C0FF 0002 EF00"
$"02EF 0002 EF00 02EF 0002 EF00 0901 0003"
$"FA00 0018 F900 1305 0003 0000 0380 FE00"
$"0838 C000 0006 0030 6000 1104 0006 0000"
$"0EFD 0001 39C0 FD00 0230 6000 1311 0007"
$"C630 180F CF07 007B C3E7 EFCC 39FB F000"
$"1311 0007 6630 300E 198D 807E C667 0E0C"
$"6C60 C000 1311 0006 3660 338C 3199 80DE"
$"CC66 0C0C CC60 C000 1311 0006 33C0 36CC"
$"3F19 80DD 98C6 0C0D 8C60 C000 1311 000C"
$"33C0 30D8 3033 80D9 98CC 1819 8CC1 8000"
$"1311 000C 6180 1998 3337 8183 19CC 1819"
$"98C1 8000 1311 000F C180 0F18 1E1F 0183"
$"0FCC 1818 F0C1 8000 0A02 0000 03FD 0000"
$"03F7 000A 0200 0003 FD00 0036 F700 0A02"
$"0000 06FD 0000 1CF7 0002 EF00 02EF 0002"
$"EF00 02EF 0002 EF00 02EF 0002 EF00 02EF"
$"0002 EF00 02EF 0002 EF00 02EF 0002 EF00"
$"02EF 0005 0100 3CF1 0012 0E00 4210 E38E"
$"0FA0 0104 0044 003C 41C0 FE00 120E 0099"
$"3114 5102 2001 8C00 4400 16C2 20FE 0013"
$"1100 A111 1451 0238 C154 C644 C895 420B"
$"325C 0013 1100 A110 F38E 0225 2124 297C"
$"2514 426C 4A52 0013 1100 9910 1451 0225"
$"E104 E844 E200 0228 4A52 0013 1100 4210"
$"2451 0225 0105 2945 2500 0228 4A52 0013"
$"1100 3C10 C38E 0224 C104 E644 E880 01C8"
$"31DC 0005 F100 0110 0005 F100 0110 0002"
$"EF00 02EF 0002 EF00 10FE 0006 046C 3C40"
$"8200 78FD 0000 40FE 0010 FE00 0604 2422"
$"0082 0044 FD00 0040 FE00 11FE 000B 0A24"
$"22CE E738 44C7 32D1 31C0 FE00 11FE 000B"
$"0A24 3C52 9240 7928 4B0A 4A40 FE00 11FE"
$"000B 1F24 2852 9230 51E6 7A0A 7A40 FE00"
$"11FE 000B 1124 2452 9208 4901 4204 4240"
$"FE00 11FE 000B 1124 224E 9170 44CE 3204"
$"31C8 FE00 06FB 0000 02F6 0006 FB00 000C"
$"F600 02EF 0002 EF00 02EF 0002 EF00 02EF"
$"00A0 0083 FF"
};
resource 'PICT' ( ( 0xC000 | ( DriverID << 5 ) ) +
sorryPicture ) {
521,
{328, 367, 366, 461},
$"1101 A000 8201 000A 0000 0000 02D0 0240"
$"9800 0E01 4801 6801 6E01 D001 4801 6F01"
$"6E01 CD01 4801 6F01 6E01 CD00 000F 0600"
$"3C07 0000 C070 FE00 030C 00C0 000F 0600"
$"1803 0000 CC30 FE00 030C 00C0 000D 0600"
$"1803 0000 CC30 FC00 01C0 000F 0B00 181F"
$"3DF8 1E3E 783E F3DD F8FF 000F 0B00 1833"
$"66EC 0C3B CC67 9E6C ECFF 000F 0B00 1833"
$"66CC 0C33 FC79 FFEC CCFF 000F 0B00 1833"
$"66CC 0C33 C01F 860C CCFF 000F 0B00 1837"
$"66CC 0C33 CC67 9E6C CCFF 000F 0B00 3C1F"
$"BDFE 073E 787C F3DF FEFF 0002 F300 02F3"
$"0002 F300 02F3 000B FC00 001C FE00 01E1"
$"C0FE 000B FC00 050C 0001 8060 C0FE 000B"
$"FC00 050C 0001 8060 C0FE 000F 0B00 03F1"
$"E0F3 CCF7 E3DE 7CCF 3EFF 000F 0B00 01DB"
$"319E 6D9B E1B3 76D9 E6FF 000F 0B00 019B"
$"3186 6D9B 018F 66DF F8FF 000F 0B00 019B"
$"3186 6D9B 01BB 66D8 1EFF 000F 0B00 019B"
$"319E 6D9B 01B7 66D9 E6FF 000F 0B00 03FD"
$"E0F3 DEF7 80FF FDEF 7CFF 0002 F300 02F3"
$"0002 F300 02F3 000C 0800 0001 CC00 0E00"
$"00E0 FC00 0C08 00C0 00CC 0006 0000 60FC"
$"000C 0800 C000 C000 0600 0060 FC00 0F0B"
$"01EF 07DC FFE6 7BFC 7C7B F780 FF00 0F0B"
$"00D9 8CCD 9BB6 CD98 76CD FCC0 FF00 0F0B"
$"00D9 8CCD E336 3D98 66FD 8FC0 FF00 0E0A"
$"00D9 8CCC 7B36 ECF0 66C1 8CFE 000F 0D00"
$"D98D CD9B 36DC F066 CD8C D998 000F 0D00"
$"7F07 FFF3 EF7E 60FF 7BC7 9998 0009 FD00"
$"0303 0000 60FB 0009 FD00 0303 0003 C0FB"
$"0009 FD00 0307 8003 80FB 00A0 0083 FF"
};